package com.itqf.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itqf.entity.Book;
import com.itqf.mapper.BookMapper;
import com.itqf.service.BookService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/12/22
 * @Time: 下午4:00
 */
@Service(version = "2.0")//注意： service :com.alibaba.dubbo.config.annotation.Service;
//代表把该类所有方法当成服务提供
public class BookServiceImpl implements BookService {

    @Resource
    private BookMapper bookMapper;

    @Override
    public List<Book> findAll() {
        return bookMapper.findAll();
    }

    @Override
    public Book findById(int id) {

        return bookMapper.findById(id);
    }
}
